<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="master.html" />
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>Photo filter</title>
    <style type="text/css">
        #photos{clear:both;overflow:hidden;padding:5px;}
        .photo{margin:2px;vertical-align:top;width:70%;clear:both;}
        .photo td{text-align:left;}
        .photo img{cursor:pointer;}
        .page{clear:both;}
        .tip{font-size:15px; color:red;}
        .correct{color:green;}
        .wrong{color:red;}
    </style>
    <script type="text/javascript">
    //<![CDATA[
        
    //]]>
    </script>
</head>
<?python
  # define mock menus as list of (title, url, is_active) tuples
  menu_top = [
    ('Home','/',False),
    ('Faces','/photofilter', False),
    ('ANN','/anntrainer', False),
    ('SVM','/svmtrainer', True)
  ]
  menu_side = [
    ('Official Website', 'http://www.turbogears.org'),
    ('Documentation', 'http://docs.turbogears.org'),
    ('Bugs & Suggestions', 'http://trac.turbogears.org'),
    ('Mailing List', 'http://groups.google.com/group/turbogears'),
  ]
?>
<body>
    <h1>Test</h1>
    <a href="svmtrainer">&lt;&lt;Back to SVM trainer</a>
    <div class="tip">Accuracy: ${rate}</div>
    <div id="photos">
        <table py:for="p in photos" class="photo" id="p${p.id}">
            <tr>
                <td><input type="checkbox" checked="checked" name="pid" value="${p.id}"/></td>
                <td><img src="getpic?id=${p.id}" width="200"/></td>
                <td><img src="getroi?id=${p.id}" /></td>
                <td><h3>${p.score}</h3></td>
                <td><h3 class="${'correct' if round(p.score)==predictions[p.id] else 'wrong'}">${predictions[p.id]}</h3></td>
            </tr>
        </table>
    </div>
</body>
</html>
